package com.java.demo;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

import java.time.LocalDateTime;

@Controller
public class Articles {

    @Bean
    public ArticlesInfo articlesInfo(){
        // 伪代码
        ArticlesInfo articlesInfo = new ArticlesInfo();
        articlesInfo.setId(1);
        articlesInfo.setTitle("Know yourself");
        articlesInfo.setContent("Keep Learning ~");
        articlesInfo.setTime(LocalDateTime.now());
        sayHi();
        return articlesInfo;
    }

    public void sayHi(){
        System.out.println("Hi~~~");
    }
}
